#!/usr/bin/env python


import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

# tramom
f.add(string = ' STATE NO: ',
      rel_tolerance = 5.0e-5)

# enedft
f.add(string = 'Final DFT energy',
      rel_tolerance = 1.0e-9)

# tes
f.add(string = 'Total number of tesserae',
      rel_tolerance = 1.0e-1)

# nuc
f.add(string = 'Nuclear repulsion energy',
      rel_tolerance = 1.0e-10)

# sym
f.add(string = 'Point group',
      rel_tolerance = 1.0e-5)

# cmass
#f.add(string = 'Center-of-mass',
#      rel_tolerance = 1.0e-5)

# neqrsp
f.add(string = 'NEQRSP =T',
      rel_tolerance = 2.0e-5)

f.add(string = '@ Excitation energy :',
      rel_tolerance = 2.0e-5)

f.add(string = '@ Oscillator strength (LENGTH)',
      rel_tolerance = 5.0e-5)

test.run(['neq_exc_sym.dal'], ['CH2O_STO-3G_sym.mol'], f={'out': f})

sys.exit(test.return_code)
